Skip to content

Conversation

@dfawley
Copy link
Collaborator

@dfawley dfawley commented Nov 6, 2025

This is based on top of #2442; please review only the final commit in this PR.

I found this pattern for writing tests to be painful. I will try to spend some time working on another approach.

The main problem I had with the tests was that the test_utils mod creates the StubPolicy and StubPolicyData meaning the tests have a hard time observing what the children Funcs did except by observing what was called on the child_controller or work_scheduler.

@dfawley dfawley added this to the grpc-next milestone Nov 6, 2025
@dfawley dfawley requested a review from arjan-bal November 6, 2025 22:56
@dfawley dfawley force-pushed the child_manager_work_scheduler branch from f888c3b to c8a2166 Compare November 7, 2025 21:23
// TODO: This is mainly provided as a fairly complex example of the current LB
// policy in use. Complete tests must be written before it can be used in
// production. Also, support for the work scheduler is missing.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Probably need to remove todo about the missing work scheduler?

@dfawley
Copy link
Collaborator Author

dfawley commented Nov 10, 2025

I started working on all the things you commented on here, but I realized now that pretty much all of your comments should be on #2442. (See PR description:)

This is based on top of #2442; please review only the final commit in this PR.

(And then I made one more commit on top of that "final commit" and fixed the old comment that you noticed. So please focus on just https://github.com/hyperium/tonic/pull/2443/files/f933d877c87e97a6c18cb14a86a861f9f7efe6a6..3332da3710d62e4c5999c88c3dd4a2d3884665b5 for this PR and we can carry forward the other discussions in #2442.)

@dfawley dfawley force-pushed the child_manager_work_scheduler branch from e5f8520 to 915958d Compare November 13, 2025 17:24
@dfawley dfawley merged commit 915c7ff into hyperium:master Nov 13, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants